package com.woniu.presell.service.impl;

import com.woniu.presell.entity.Check;
import com.woniu.presell.entity.Licence;
import com.woniu.presell.mapper.CheckMapper;
import com.woniu.presell.mapper.LicenceMapper;
import com.woniu.presell.service.CheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: house-after
 * @description:
 * @author: qqq
 * @create: 2022-12-15 20:20
 **/
@Service
public class CheckServiceImpl implements CheckService {
    @Autowired
    private CheckMapper checkMapper;
    @Autowired
    private LicenceMapper licenceMapper;
    @Override
    public int updateSelcvite(Check record) {
        return checkMapper.updateByPrimaryKeySelective(record);
    }


    @Override
    public Check selectById(Long id) {
        return checkMapper.selectById(id);
    }

    @Override
    public int licenceUpdate(Integer id) {
        Licence licence =new Licence();
        licence.setLicenceId(id);
        licence.setLicenceStaus("<已审批>");
        return licenceMapper.updateByPrimaryKeySelective(licence);
    }
}
